﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
    CodeBehind="ViewSchool.aspx.cs" Inherits="WebApplication1.ViewSchool" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .class0
        {
            background: #FFCC80 url("images/x.gif") repeat-x;
            width: 0px;
            height: 17px;
        }
        .class1
        {
            /*background: #FFCC80 url("images/x.gif") repeat-x;
            width: 20px;*/
            background: #FFCC80 url("images/star1.jpg") no-repeat;
            width: 86px;
            height: 17px;
        }
        .class2
        {
            /*background: #FFCC80 url("images/x.gif") repeat-x;
            width: 40px;*/
            background: #FFCC80 url("images/star2.jpg") no-repeat;
            width: 86px;
            height: 17px;
        }
        .class3
        {
            /*background: #FFCC80 url("images/x.gif") repeat-x;
            width: 60px;*/
            background: #FFCC80 url("images/star3.jpg") no-repeat;
            width: 86px;
            height: 17px;
        }
        .class4
        {
            /*background: #FFCC80 url("images/x.gif") repeat-x;
            width: 80px;*/
            background: #FFCC80 url("images/star4.jpg") no-repeat;
            width: 86px;
            height: 17px;
        }
        .class5
        {
            /*background: #FFCC80 url("images/x.gif") repeat-x;
            width: 100px;*/
            background: #FFCC80 url("images/star5.jpg") no-repeat;
            width: 86px;
            height: 17px;
        }
    </style>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script language="javascript">
        var sArray = new Object;
        sArray[0] = new Image;
        sArray[0].src = "icon_star_1.gif";
        for (var i = 1; i < 6; i++) {
            sArray[i] = new Image();
            sArray[i].src = "icon_star_2.gif";
        }
        var starTimer;
        var pro;
        var rate;
        function initStar() {
            try {
                setProfix("star_");
                setStars(document.getElementById("rating").value, 'rating');
                setProfix("taste_");
                setStars(document.getElementById("taste").value, 'taste');
                setProfix("price_");
                setStars(document.getElementById("price").value, 'price');
                setProfix("environment_");
                setStars(document.getElementById("environment").value, 'environment');
                setProfix("huanj_");
                setStars(document.getElementById("huanj").value, 'huanj');
            } catch (e) {
            }
        }
        function showStars(starNum, rate) {
            try {
                clearStarTimer();
                greyStars();
                colorStars(starNum);
                if (rate == "taste")
                    $("#HiddenField1").attr("value", starNum);
                if (rate == "environment")
                    $("#HiddenField2").attr("value", starNum);
                if (rate == "price")
                    $("#HiddenField3").attr("value", starNum);
                if (rate == "huanj")
                    $("#HiddenField4").attr("value", starNum);
                //alert($("#HiddenField4").val());
            } catch (e) { }
            //setStars(starNum,rate);
        }
        function setProfix(profix) {
            pro = profix;

        }
        function colorStars(starNum) {
            try {
                for (var i = 1; i <= starNum; i++) {
                    var tmpStar = document.getElementById(pro + i);
                    tmpStar.src = sArray[starNum].src;
                }
            } catch (e) { }
        }
        function greyStars() {
            try {
                for (var i = 1; i < 6; i++) {
                    var tmpStar = document.getElementById(pro + i);
                    tmpStar.src = sArray[0].src;
                }
            } catch (e) { }
        }
        function greyAll(curpro, currate) {
            try {
                document.getElementById(currate).value = "";
                for (var i = 1; i < 6; i++) {
                    var tmpStar = document.getElementById(curpro + i);
                    tmpStar.src = sArray[0].src;
                }
            } catch (e) { }
        }
        function setStars(starNum, rate) {
            rate = rate;
            try {
                clearStarTimer();
                var rating = document.getElementById(rate);
                rating.value = starNum;
                showStars(starNum);
            } catch (e) { }
        }
        function clearStars(currate) {
            rate = currate;
            try {
                var rating = document.getElementById(rate);
                if (rating.value != '') {
                    setStars(rating.value, rate);
                } else {
                    greyStars();
                }
            } catch (e) { }
        }
        function resetStars() {
            try {
                clearStarTimer();
                var rating = document.getElementById(rate);
                if (rating.value != '') {
                    setStars(rating.value, rate);
                } else {
                    greyStars();
                }
            } catch (e) { }
        }
        function clearStarTimer() {
            if (starTimer) {
                clearTimeout(starTimer);
                starTimer = null;
            }
        }
    </script>
    <script type="text/javascript">
        function openWin() {
            window.showModalDialog("newOrg.aspx", "dialogWidth=200px;dialogHeight=100px");
        }
    </script>

    <script src="js/jquery.chromatable.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#course").chromatable({
                width: "100%", // specify 100%, auto, or a fixed pixel amount
                height: "260px",
                scrolling: "yes" // must have the jquery-1.3.2.min.js script installed to use
            });
        });
</script>
<style type="text/css">
table.course th {
background-color: rgb(231,244,254);
border-right: 1px solid #D5D5D5;
line-height: 120%;
font-weight: bold;
padding: 8px 5px;
text-align: left;
}
table.course td {
border-right: 1px solid #D5D5D5;
line-height: 120%;
padding: 8px 5px;
text-align: left;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="main">
        <div id="s_bodya">
            <span>
                <div style="float: left;">
                    <asp:TextBox ID="tbxSearch" CssClass="search_input" Text="输入您的地址或所在学校" runat="server"></asp:TextBox>
                </div>
            </span><span class="inputb">
                <asp:ImageButton ID="ibSearch" ImageUrl="images/s003.gif" runat="server" ClientIDMode="Static"
                    OnClick="btnSearch_Click" /></span>
            <div class="c">
            </div>
        </div>
    </div>
    <div class="main">
        <div class="list c height30">
            <div class="title">
                机构</div>
            <asp:Repeater ID="RepeaterSchoolInfo" runat="server" OnItemDataBound="RepeaterSchoolInfo_ItemDataBound">
                <ItemTemplate>
                    <div class="line c">
                        <div class="c fllist">
                            <div class="xx">
                                <div class="title">
                                    <%#Eval("Name") %></div>
                                <div class="hui c">
                                    地址:<%#Eval("Address") %></div>
                                <div class="hui c">
                                    电话:<%#Eval("Phone")%></div>
                                <div class="hui c">
                                    类型:<%#Eval("Type")%></div>
                                <div class="hui c" style="display: none;">
                                    标签:
                                    <asp:Repeater ID="RepeaterTag" runat="server">
                                        <ItemTemplate>
                                            <%#Eval("TagName") %>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                                <div class="pjbc" style="margin-top: 25px;">
                                    热度：<%#Eval("Popularity") %></div>
                            </div>
                            <div class="pja">
                                <p>
                                    <span>总评</span> <span class="class<%#Eval("SL_Integrate") %>"></span>
                                </p>
                                <p>
                                    <span>质量</span> <span class="class<%#Eval("SL_Quality") %>"></span>
                                </p>
                                <p>
                                    <span>价格</span><span class="class<%#Eval("SL_Price") %>"> </span>
                                </p>
                                <p>
                                    <span>服务</span><span class="class<%#Eval("SL_Service") %>"> </span>
                                </p>
                                <p>
                                    <span>环境</span><span class="class<%#Eval("SL_Environment") %>"> </span>
                                </p>
                            </div>
                        </div>
                        <div class="c">
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
        <div class="list c height30">
            <div class="title">
                机构简介</div>
            <div class="pxa">
            </div>
            <div class="pxb">
                <%--<img src="images/005.gif" />--%></div>
            <div class="line">
                <div class="c fllist">
                    <%#strBriefInfo %></div>
                <div class="c">
                </div>
            </div>
            <div class="list c height30">
                <div class="title">
                    课程导航</div>
                <div class="pxa">
                </div>
                <div class="pxb">
                    <%--<img src="images/008.gif" />--%></div>
                <div class="line c" style="height:300px;">
                    <div class="c fllist">
                        <asp:Repeater ID="RepeaterTopCourse" runat="server">
                            <HeaderTemplate>
                                <table id="course" class="course" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#0080D9">
                                    <thead>
                                        <tr>
                                            <th width="27%" height="40" bgcolor="#FFFFFF">
                                                课程名字
                                            </th>
                                            <th width="13%" bgcolor="#FFFFFF">
                                                课程容量
                                            </th>
                                            <th width="21%" bgcolor="#FFFFFF">
                                                课程收费
                                            </th>
                                            <th width="39%" bgcolor="#FFFFFF">
                                                上课地址
                                            </th>
                                        </tr>
                                        </thead>
                                        <tbody>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td height="40" bgcolor="#FFFFFF">
                                        <%#Eval("CourseName") %>
                                    </td>
                                    <td bgcolor="#FFFFFF">
                                        <%#Eval("CourseCapability") %>
                                    </td>
                                    <td bgcolor="#FFFFFF">
                                        <%#Eval("CoursePrice") %>
                                    </td>
                                    <td bgcolor="#FFFFFF">
                                        <%#Eval("Address") %>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </tbody></table>
                            </FooterTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="c">
                    </div>
                </div>
            </div>
            <div class="list c height30" style="height:90px;">
                <div class="title">
                    评论</div>
                <div class="pxb" style="float: right; margin-right: 100px;">
                    <%--<img src="images/009.gif" alt="图片无法显示" />--%></div>
                <asp:Repeater ID="RepeaterComment" runat="server">
                    <ItemTemplate>
                        <div class="line c">
                            <div class="c fllist">
                                <table width="100%" border="0" cellpadding="2" cellspacing="2">
                                    <tbody>
                                        <tr>
                                            <td width="12%" height="40" valign="top">
                                                <%#Eval("UserName") %>
                                            </td>
                                            <td width="26%" valign="top">
                                                <%#Eval("Comment") %>
                                            </td>
                                            <td width="14%" valign="top">
                                                <%#Eval("UploadTime") %>
                                            </td>
                                            <td width="13%" valign="top">
                                                质量：<br>
                                                <span class="class<%#Eval("SL_Quality") %>"></span>
                                            </td>
                                            <td width="12%" valign="top">
                                                价格：<br>
                                                <span class="class<%#Eval("SL_Price") %>"></span>
                                            </td>
                                            <td width="11%" valign="top">
                                                服务：<br>
                                                <span class="class<%#Eval("SL_Service") %>"></span>
                                            </td>
                                            <td width="12%" valign="top">
                                                环境：<br>
                                                <span class="class<%#Eval("SL_Environment") %>"></span>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="c">
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
            <div class="fypage">
                <asp:Label ID="lblCurrentPage" runat="server"></asp:Label>
                <asp:HyperLink ID="lnkFrist" runat="server">首页</asp:HyperLink>
                <asp:HyperLink ID="lnkPrev" runat="server">上一页</asp:HyperLink>
                <asp:HyperLink ID="lnkNext" runat="server">下一页</asp:HyperLink>
                <asp:HyperLink ID="lnkEnd" runat="server">尾页</asp:HyperLink>
            </div>
            <div class="pjj c">
                <div>
                    <img src="images/010.gif" /></div>
                <div class="star c">
                    <ul>
                        <li><span>质量</span><span class="Select"> <a onmouseover="javascript:setProfix('taste_');showStars(1,'taste');"
                            onmouseout="javascript:setProfix('taste_');clearStars('taste');" href="javascript:setProfix('taste_');setStars(1,'taste');">
                            <img id="taste_1" title="差(1)" src="icon_star_1.gif"  class="pic_m_10" /></a> <a onmouseover="javascript:setProfix('taste_');showStars(2,'taste');"
                                onmouseout="javascript:setProfix('taste_');clearStars('taste');" href="javascript:setProfix('taste_');setStars(2,'taste');">
                                <img id="taste_2" title="一般(2)" src="icon_star_1.gif" class="pic_m_10" /></a>
                            <a onmouseover="javascript:setProfix('taste_');showStars(3,'taste');" onmouseout="javascript:setProfix('taste_');clearStars('taste');"
                                href="javascript:setProfix('taste_');setStars(3,'taste');">
                                <img id="taste_3" title="好(3)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('taste_');showStars(4,'taste');"
                                    onmouseout="javascript:setProfix('taste_');clearStars('taste');" href="javascript:setProfix('taste_');setStars(4,'taste');"><img
                                        id="taste_4" title="很好(4)" src="icon_star_1.gif" /></a><a onmouseover="javascript:setProfix('taste_');showStars(5,'taste');"
                                            onmouseout="javascript:setProfix('taste_');clearStars('taste');" href="javascript:setProfix('taste_');setStars(5,'taste');"><img
                                                id="taste_5" title="非常好(5)" src="icon_star_1.gif" /></a> </span>
                        </li>
                        <li><span>价格</span><span class="Select"> <a onmouseover="javascript:setProfix('environment_');showStars(1,'environment');"
                            onmouseout="javascript:setProfix('environment_');clearStars('environment');"
                            href="javascript:setProfix('environment_');setStars(1,'environment');">
                            <img id="environment_1" title="差(1)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('environment_');showStars(2,'environment');"
                                onmouseout="javascript:setProfix('environment_');clearStars('environment');"
                                href="javascript:setProfix('environment_');setStars(2,'environment');"><img id="environment_2"
                                    title="一般(2)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('environment_');showStars(3,'environment');"
                                        onmouseout="javascript:setProfix('environment_');clearStars('environment');"
                                        href="javascript:setProfix('environment_');setStars(3,'environment');"><img id="environment_3"
                                            title="好(3)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('environment_');showStars(4,'environment');"
                                                onmouseout="javascript:setProfix('environment_');clearStars('environment');"
                                                href="javascript:setProfix('environment_');setStars(4,'environment');"><img id="environment_4"
                                                    title="很好(4)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('environment_');showStars(5,'environment');"
                                                        onmouseout="javascript:setProfix('environment_');clearStars('environment');"
                                                        href="javascript:setProfix('environment_');setStars(5,'environment');"><img id="environment_5"
                                                            title="非常好(5)" src="icon_star_1.gif"></a> </span>
                        </li>
                    </ul>
                    <ul>
                        <li><span>服务&nbsp;</span><span class="Select"><a onmouseover="javascript:setProfix('price_');showStars(1,'price');"
                            onmouseout="javascript:setProfix('price_');clearStars('price');" href="javascript:setProfix('price_');setStars(1,'price');"><img
                                id="price_1" title="差(1)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('price_');showStars(2,'price');"
                                    onmouseout="javascript:setProfix('price_');clearStars('price');" href="javascript:setProfix('price_');setStars(2,'price');"><img
                                        id="price_2" title="一般(2)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('price_');showStars(3,'price');"
                                            onmouseout="javascript:setProfix('price_');clearStars('price');" href="javascript:setProfix('price_');setStars(3,'price');"><img
                                                id="price_3" title="好(3)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('price_');showStars(4,'price');"
                                                    onmouseout="javascript:setProfix('price_');clearStars('price');" href="javascript:setProfix('price_');setStars(4,'price');"><img
                                                        id="price_4" title="很好(4)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('price_');showStars(5,'price');"
                                                            onmouseout="javascript:setProfix('price_');clearStars('price');" href="javascript:setProfix('price_');setStars(5,'price');"><img
                                                                id="price_5" title="非常好(5)" src="icon_star_1.gif"></a>
                        </span></li>
                        <li><span>环境</span><span class="Select"> <a onmouseover="javascript:setProfix('huanj_');showStars(1,'huanj');"
                            onmouseout="javascript:setProfix('huanj_');clearStars('huanj');" href="javascript:setProfix('huanj_');setStars(1,'huanj');">
                            <img id="huanj_1" title="差(1)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('huanj_');showStars(2,'huanj');"
                                onmouseout="javascript:setProfix('huanj_');clearStars('huanj');" href="javascript:setProfix('huanj_');setStars(2,'huanj');"><img
                                    id="huanj_2" title="一般(2)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('huanj_');showStars(3,'huanj');"
                                        onmouseout="javascript:setProfix('huanj_');clearStars('huanj');" href="javascript:setProfix('huanj_');setStars(3,'huanj');"><img
                                            id="huanj_3" title="好(3)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('huanj_');showStars(4,'huanj');"
                                                onmouseout="javascript:setProfix('huanj_');clearStars('huanj');" href="javascript:setProfix('huanj_');setStars(4,'huanj');"><img
                                                    id="huanj_4" title="很好(4)" src="icon_star_1.gif"></a><a onmouseover="javascript:setProfix('huanj_');showStars(5,'huanj');"
                                                        onmouseout="javascript:setProfix('huanj_');clearStars('huanj');" href="javascript:setProfix('huanj_');setStars(5,'huanj');"><img
                                                            id="huanj_5" title="非常好(5)" src="icon_star_1.gif"></a></span></li></ul>
                </div>
                <div class="plnr c" style="position: absolute;">
                    <span>评论*</span>
                    <asp:TextBox ID="tbxComment" runat="server" TextMode="MultiLine" MaxLength="500"></asp:TextBox>
                </div>
                <div style="clear: both;">
                </div>
                <div id="CommentWarning" runat="server" style="position:absolute;left: 400px;z-index: 1000;">
                    评论，请先<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">登录</asp:LinkButton>
                    |<asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">注册</asp:LinkButton>
                    ,学校机构帐号不能评论
                </div>
                <div class="c tj" style="margin-top: 40px;">
                    <asp:ImageButton ID="ibOK" runat="server" ImageUrl="images/tj.gif" OnClick="ibOK_Click" />
                </div>
            </div>
        </div>
        <div class="jiameng c">
            <div>
                我要纠正</div>
            <div>
                <asp:ImageButton ID="ibCorrect" runat="server" ImageUrl="images/0078.gif" OnClick="ibCorrect_Click" />
                <asp:CheckBox ID="CheckBox_Address" runat="server" Text="机构地址" />
                <asp:CheckBox ID="CheckBox_Tel" runat="server" Text="机构电话" />
                <asp:CheckBox ID="CheckBox_Map" runat="server" Text="地图位置" />
                <asp:CheckBox ID="CheckBox_Tag" runat="server" Text=" 课程" />
            </div>
        </div>
    </div>
    <asp:HiddenField ID="HiddenField1" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="HiddenField3" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="HiddenField4" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="HiddenField5" runat="server" ClientIDMode="Static" />
    <%--    没有找到想要的商户，请<asp:Button ID="btnAddSchool" runat="server" Text="添加商户" />--%>
</asp:Content>
